home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13368 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: mail2news.demon.co.uk!g0tts.demon.co.uk
  2. From: Paul Bulmer <paul@g0tts.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Turning String contents to hex ???
  5. Date: Sun, 07 Apr 96 16:03:47 GMT
  6. Organization: Myorganisation
  7. Message-ID: <828893027snz@g0tts.demon.co.uk>
  8. Reply-To: paul@g0tts.demon.co.uk
  9. X-NNTP-Posting-Host: g0tts.demon.co.uk
  10. X-Newsreader: Demon Internet Simple News v1.30
  11. X-Mail2News-Path: g0tts.demon.co.uk
  12.  
  13. Hi i have a slight problem and i have looked all over for the answer so please
  14. help if you can ....
  15.  
  16. I have a routine that calculates hex codes for a eprom image and the end result
  17. is stored in a string called rx , now rx may hold the value B2C5 which is
  18. the hex code that the program has calculated but as soon as i save this to a
  19. file in binary mode (i need binary mode) it saves the value but as soon as i
  20. view this in hex mode i get the value in hex of b2c5 not 0B 02 0C 05 as i 
  21. wanted  , you may be thinking why convert to hex in the program then save it
  22. to a file the reason for this is the normal dcba order is wrong for my 
  23. application if you look at dcba as the order of hex then i would need bcad as
  24. the order of hex. I want to keep my program ansi compatable also i am new to
  25. C programming so the answer is probably in front of me but just hasn't clicked.
  26.  
  27.  
  28.  
  29. -- 
  30. Paul Bulmer
  31.